Name | command |
Event Lines | command
<command_name> command |
Triggers | when a player, console, or command block/minecart runs a Bukkit command. This happens before
any code of established commands, allowing scripts to 'override' existing commands. Note that for the sake of the event line, escaping is used, so 'bukkit:plugins' becomes 'bukkit&coplugins' |
Generated Examples | after command:
after command_name command: |
Has Player | when source_type is player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Contexts | <context.command> returns the command name as an ElementTag.
<context.raw_args> returns any args used, unmodified as plaintext.
<context.args> returns a ListTag of the arguments.
<context.source_type> returns the source of the command. Can be: PLAYER, SERVER, COMMAND_BLOCK, or COMMAND_MINECART.
<context.command_block_location> returns the command block's location (if the command was run from one).
<context.command_minecart> returns the EntityTag of the command minecart (if the command was run from one).
|
Determine | "FULFILLED" to tell Bukkit the command was handled. |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Server |
Warning(s) | This event is to override existing commands, and should not be used to create new commands - use a command script instead. |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/server/CommandScriptEvent.java#L27 |